﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoderJoe.WoW.Services
{
	class RealmService
	{
		protected List<string> RegionList { get; private set; }
		public IEnumerable<string> Regions { get { return RegionList.AsEnumerable(); } }
		protected List<Realm> RealmList { get; private set; }

		public RealmService()
		{
			RegionList = new List<string>();

			RegionList.Add("US");
			RegionList.Add("EU");

			RealmList = new List<Realm>();
			RealmList.Add(new Realm(){ Name="Medivh", RegionKey="US" });
		}

		public IEnumerable<string> FindRealmsForRegion(string region)
		{
			return
				(from r in RealmList
				 where r.RegionKey == region
				 select r.Name);
		}

		public class Realm
		{
			public string RegionKey { get; set; }
			public string Name { get; set; }
		}
	}
}
